﻿using System.Threading.Tasks;
using MahApps.Metro.Controls.Dialogs;
using MaxStoreErp.Core.Interfaces;

namespace MaxStoreErp.Core.Infrastructure
{
    public class MetroProgressDialogController: IProgressDialogController
    {
        readonly ProgressDialogController _dialogController;

        internal MetroProgressDialogController(ProgressDialogController controller)
        {
            _dialogController = controller;
        }

        public bool IsOpen
        {
            get
            {
                return _dialogController.IsOpen;
            }
        }

        public bool IsCanceled
        {
            get
            {
                return _dialogController.IsCanceled;
            }
        }

        public void SetIndeterminate()
        {
            _dialogController.SetIndeterminate();
        }

        public void SetCancelable(bool value)
        {
            _dialogController.SetCancelable(value);
        }

        public void SetProgress(double value)
        {
            _dialogController.SetProgress(value);
        }

        public void SetMessage(string message)
        {
            _dialogController.SetMessage(message);
        }

        public Task CloseAsync()
        {
            return _dialogController.CloseAsync();
        }
    }
}
